import request from "@/router/axios";

export const getList = (current, size, params) => {
  return request({
    url: "/api/hg-quality/costadjustform/page",
    method: "get",
    params: {
      ...params,
      current,
      size
    }
  });
};

export const getProject = proName => {
  return request({
    url: `/api/hg-quality/costadjustpro/list`,
    method: "get",
    params: {
      proName
    }
  });
};

export const submit = (data, type) => {
  return request({
    url: `/api/hg-quality/costadjustform/${type}`,
    method: "post",
    data: data
  });
};

export const remove = ids => {
  return request({
    url: `/api/hg-quality/costadjustform/remove`,
    method: "post",
    params: {
      ids
    }
  });
};

export const detail = id => {
  return request({
    url: `/api/hg-quality/costadjustform/detail`,
    method: "get",
    params: {
      id
    }
  });
};

export const startProcess = id => {
  return request({
    url: `/api/hg-quality/costadjustform/start-process`,
    method: "post",
    params: {
      id
    }
  });
};

export const getDetailList = (current, size, params) => {
  return request({
    url: "/api/blade-produce/product/productionconsumed/getInformationList",
    method: "get",
    params: {
      current,
      size,
      ...params,
    }
  });
};